package com.changfen.domain;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import java.math.BigDecimal;

/**
 * @author changfeng.chen@things-matrix.com
 * @date 2022/9/21 16:43
 **/
@Entity
@Table(name = "account_tbl")
@Data
@DynamicUpdate
@DynamicInsert
@Builder
@AllArgsConstructor
@NoArgsConstructor
@Accessors(chain = true)
public class Account {
    @Id
    private Long id;

    @Column(name = "user_id")
    private String userId;

    @Column(name = "money")
    private BigDecimal money;
}
